#include <REGX52.H>

int main()
{
	while(1)
	{
		if(P3_1==0)//when press the key,P31==0
		{
			P2_0=0;//light
		}
		else 
		{
			P2_0=1;//close
		}
	}
	return 0;
}